<%@page import="cn.news.entity.Press"%>
<%@page import="java.util.List"%>
<%@page import="cn.news.biz.PressBiz"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看新闻页面</title>
</head>
<body background="pic/ManBgroud.gif">
	<table width="100%" >
		<tr>
			<th>新闻id</th>
			<th>新闻标题</th>
			<th>新闻时间</th>
			<th>新闻作者</th>
			<th>新闻主题</th>
			<th>编辑新闻</th>		
		</tr>
		<%
			PressBiz tbiz=new PressBiz();
			List<Press>list=tbiz.searchAll();
			request.setAttribute("list", list);
		%>
		<c:forEach items="${list}" var="p">
			<tr>
				<th><c:out value="${p.pid}"></c:out></th>
				<th><c:out value="${p.title}"></c:out></th>
				<th><c:out value="${p.ptime}"></c:out></th>
				<th><c:out value="${p.uid}"></c:out></th>
				<th><c:out value="${p.tid}"></c:out></th>
				<th><a href="AdminPidPressServlet?pid=${p.pid}" >编辑</a>||<a href="AdmindeleteServlet?pid=${p.pid}" >删除</a> </th>
			</tr>
		</c:forEach>
		
		
	</table>
	<%--javascript:confirm('确认删除？')?<%tbiz.delete(tid); %>:window.location.href='topicSucc.jsp';是外键所以不能删除 --%>
</body>
</html>